package com.xtoneict.auth.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.xtoneict.auth.entity.WorkTimeFile;
import com.xtoneict.auth.entity.YearMonthTab;
import com.xtoneict.auth.entity.param.FilePageParam;
import com.xtoneict.auth.entity.param.FilePageResultParam;

import java.util.List;

public interface IWorkTimeFileService extends IService<WorkTimeFile> {
    public Integer Insert(WorkTimeFile workTimeFile);

    public Integer update(WorkTimeFile workTimeFile);

    //批量插入关系
    public Integer InsertUserAndFileBatch(List<Integer> userId, List<Integer> fileIds);

    //删除关系
    public Integer deleteUserAndFile(List<Integer> userIds, List<Integer> fileIds);

    //根据条件分页查询file
    public FilePageResultParam selectFiles(FilePageParam filePageParam);

    //根据条件查询审核能看到的所有file
    public List<WorkTimeFile> selectFilesForManager(FilePageParam filePageParam);

    //根据审核id查询工时表
    public List<Integer> selectFileIdsByUser(Integer userId);

    //根据工时表查询用户
    public List<Integer> selectUserIdByFile(Integer fileId);
}
